import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/smart_warehouse/warehouse_entity.dart';
import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';


WarehouseEntity $WarehouseEntityFromJson(Map<String, dynamic> json) {
  final WarehouseEntity warehouseEntity = WarehouseEntity();
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    warehouseEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    warehouseEntity.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    warehouseEntity.createDate = createDate;
  }
  final int? currentStorageCapacity = jsonConvert.convert<int>(json['currentStorageCapacity']);
  if (currentStorageCapacity != null) {
    warehouseEntity.currentStorageCapacity = currentStorageCapacity;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    warehouseEntity.deleted = deleted;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    warehouseEntity.id = id;
  }
  final int? immediately = jsonConvert.convert<int>(json['immediately']);
  if (immediately != null) {
    warehouseEntity.immediately = immediately;
  }
  final int? limitedPersonnelNum = jsonConvert.convert<int>(json['limitedPersonnelNum']);
  if (limitedPersonnelNum != null) {
    warehouseEntity.limitedPersonnelNum = limitedPersonnelNum;
  }
  final String? mobile = jsonConvert.convert<String>(json['mobile']);
  if (mobile != null) {
    warehouseEntity.mobile = mobile;
  }
  final int? relTimeNum = jsonConvert.convert<int>(json['relTimeNum']);
  if (relTimeNum != null) {
    warehouseEntity.relTimeNum = relTimeNum;
  }
  final int? releaseNum = jsonConvert.convert<int>(json['releaseNum']);
  if (releaseNum != null) {
    warehouseEntity.releaseNum = releaseNum;
  }
  final String? responsibilityPhone = jsonConvert.convert<String>(json['responsibilityPhone']);
  if (responsibilityPhone != null) {
    warehouseEntity.responsibilityPhone = responsibilityPhone;
  }
  final String? sadetyPersonId = jsonConvert.convert<String>(json['sadetyPersonId']);
  if (sadetyPersonId != null) {
    warehouseEntity.sadetyPersonId = sadetyPersonId;
  }
  final String? sadetyPersonName = jsonConvert.convert<String>(json['sadetyPersonName']);
  if (sadetyPersonName != null) {
    warehouseEntity.sadetyPersonName = sadetyPersonName;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    warehouseEntity.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    warehouseEntity.updateDate = updateDate;
  }
  final String? warehouseArea = jsonConvert.convert<String>(json['warehouseArea']);
  if (warehouseArea != null) {
    warehouseEntity.warehouseArea = warehouseArea;
  }
  final String? warehouseLevel = jsonConvert.convert<String>(json['warehouseLevel']);
  if (warehouseLevel != null) {
    warehouseEntity.warehouseLevel = warehouseLevel;
  }
  final String? warehouseName = jsonConvert.convert<String>(json['warehouseName']);
  if (warehouseName != null) {
    warehouseEntity.warehouseName = warehouseName;
  }
  final String? warehouseNumber = jsonConvert.convert<String>(json['warehouseNumber']);
  if (warehouseNumber != null) {
    warehouseEntity.warehouseNumber = warehouseNumber;
  }
  final int? warehouseStore = jsonConvert.convert<int>(json['warehouseStore']);
  if (warehouseStore != null) {
    warehouseEntity.warehouseStore = warehouseStore;
  }
  final bool? excess = jsonConvert.convert<bool>(json['excess']);
  if (excess != null) {
    warehouseEntity.excess = excess;
  }
  final bool? isChecked = jsonConvert.convert<bool>(json['isChecked']);
  if (isChecked != null) {
    warehouseEntity.isChecked = isChecked;
  }
  return warehouseEntity;
}

Map<String, dynamic> $WarehouseEntityToJson(WarehouseEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createDate'] = entity.createDate;
  data['currentStorageCapacity'] = entity.currentStorageCapacity;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['immediately'] = entity.immediately;
  data['limitedPersonnelNum'] = entity.limitedPersonnelNum;
  data['mobile'] = entity.mobile;
  data['relTimeNum'] = entity.relTimeNum;
  data['releaseNum'] = entity.releaseNum;
  data['responsibilityPhone'] = entity.responsibilityPhone;
  data['sadetyPersonId'] = entity.sadetyPersonId;
  data['sadetyPersonName'] = entity.sadetyPersonName;
  data['updateBy'] = entity.updateBy;
  data['updateDate'] = entity.updateDate;
  data['warehouseArea'] = entity.warehouseArea;
  data['warehouseLevel'] = entity.warehouseLevel;
  data['warehouseName'] = entity.warehouseName;
  data['warehouseNumber'] = entity.warehouseNumber;
  data['warehouseStore'] = entity.warehouseStore;
  data['excess'] = entity.excess;
  data['isChecked'] = entity.isChecked;
  return data;
}

extension WarehouseEntityExtension on WarehouseEntity {
  WarehouseEntity copyWith({
    String? companyCode,
    String? createBy,
    String? createDate,
    int? currentStorageCapacity,
    String? deleted,
    String? id,
    int? immediately,
    int? limitedPersonnelNum,
    String? mobile,
    int? relTimeNum,
    int? releaseNum,
    String? responsibilityPhone,
    String? sadetyPersonId,
    String? sadetyPersonName,
    String? updateBy,
    String? updateDate,
    String? warehouseArea,
    String? warehouseLevel,
    String? warehouseName,
    String? warehouseNumber,
    int? warehouseStore,
    bool? excess,
    bool? isChecked,
  }) {
    return WarehouseEntity()
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..currentStorageCapacity = currentStorageCapacity ?? this.currentStorageCapacity
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..immediately = immediately ?? this.immediately
      ..limitedPersonnelNum = limitedPersonnelNum ?? this.limitedPersonnelNum
      ..mobile = mobile ?? this.mobile
      ..relTimeNum = relTimeNum ?? this.relTimeNum
      ..releaseNum = releaseNum ?? this.releaseNum
      ..responsibilityPhone = responsibilityPhone ?? this.responsibilityPhone
      ..sadetyPersonId = sadetyPersonId ?? this.sadetyPersonId
      ..sadetyPersonName = sadetyPersonName ?? this.sadetyPersonName
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..warehouseArea = warehouseArea ?? this.warehouseArea
      ..warehouseLevel = warehouseLevel ?? this.warehouseLevel
      ..warehouseName = warehouseName ?? this.warehouseName
      ..warehouseNumber = warehouseNumber ?? this.warehouseNumber
      ..warehouseStore = warehouseStore ?? this.warehouseStore
      ..excess = excess ?? this.excess
      ..isChecked = isChecked ?? this.isChecked;
  }
}
